home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / CardServices.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  35.6 KB  |  1,053 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CardServices.a
  3. ;
  4. ;    Contains:    The client interface to Card and Socket Services.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1994-1997 by Apple Computer, Inc. All rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__CARDSERVICES__') = 'UNDEFINED' THEN
  19. __CARDSERVICES__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__PCCARDTUPLES__') = 'UNDEFINED' THEN
  25.     include 'PCCardTuples.a'
  26.     ENDIF
  27.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  28.     include 'MixedMode.a'
  29.     ENDIF
  30.  
  31. ;     miscellaneous
  32.  
  33.  
  34. CS_MAX_SOCKETS                    EQU        32                    ; a long is used as a socket bitmap
  35.  
  36. ;  Will move to <Traps.h>
  37.  
  38. _PCCardDispatch                    EQU        $AAF0                ; Card Services entry trap
  39. ;  Will move to <Errors.h>
  40.  
  41. ;     result codes
  42.  
  43.  
  44. kCSBadAdapterErr                EQU        -9050                ; invalid adapter number
  45. kCSBadAttributeErr                EQU        -9051                ; specified attributes field value is invalid
  46. kCSBadBaseErr                    EQU        -9052                ; specified base system memory address is invalid
  47. kCSBadEDCErr                    EQU        -9053                ; specified EDC generator specified is invalid
  48. kCSBadIRQErr                    EQU        -9054                ; specified IRQ level is invalid
  49. kCSBadOffsetErr                    EQU        -9055                ; specified PC card memory array offset is invalid
  50. kCSBadPageErr                    EQU        -9056                ; specified page is invalid
  51. kCSBadSizeErr                    EQU        -9057                ; specified size is invalid
  52. kCSBadSocketErr                    EQU        -9058                ; specified logical or physical socket number is invalid
  53. kCSBadTypeErr                    EQU        -9059                ; specified window or interface type is invalid
  54. kCSBadVccErr                    EQU        -9060                ; specified Vcc power level index is invalid
  55. kCSBadVppErr                    EQU        -9061                ; specified Vpp1 or Vpp2 power level index is invalid
  56. kCSBadWindowErr                    EQU        -9062                ; specified window is invalid
  57. kCSBadArgLengthErr                EQU        -9063                ; ArgLength argument is invalid
  58. kCSBadArgsErr                    EQU        -9064                ; values in argument packet are invalid
  59. kCSBadHandleErr                    EQU        -9065                ; clientHandle is invalid
  60. kCSBadCISErr                    EQU        -9066                ; CIS on card is invalid
  61. kCSBadSpeedErr                    EQU        -9067                ; specified speed is unavailable
  62. kCSReadFailureErr                EQU        -9068                ; unable to complete read request
  63. kCSWriteFailureErr                EQU        -9069                ; unable to complete write request
  64. kCSGeneralFailureErr            EQU        -9070                ; an undefined error has occurred
  65. kCSNoCardErr                    EQU        -9071                ; no PC card in the socket
  66. kCSUnsupportedFunctionErr        EQU        -9072                ; function is not supported by this implementation
  67. kCSUnsupportedModeErr            EQU        -9073                ; mode is not supported
  68. kCSBusyErr                        EQU        -9074                ; unable to process request at this time - try later
  69. kCSWriteProtectedErr            EQU        -9075                ; media is write-protected
  70. kCSConfigurationLockedErr        EQU        -9076                ; a configuration has already been locked
  71. kCSInUseErr                        EQU        -9077                ; requested resource is being used by a client
  72. kCSNoMoreItemsErr                EQU        -9078                ; there are no more of the requested item
  73. kCSOutOfResourceErr                EQU        -9079                ; Card Services has exhausted the resource
  74.  
  75.  
  76. ;     messages sent to client's event handler
  77.  
  78.  
  79. kCSNullMessage                    EQU        $00                    ; no messages pending (not sent to clients)
  80. kCSCardInsertionMessage            EQU        $01                    ; card has been inserted into the socket
  81. kCSCardRemovalMessage            EQU        $02                    ; card has been removed from the socket
  82. kCSCardLockMessage                EQU        $03                    ; card is locked into the socket with a mechanical latch
  83. kCSCardUnlockMessage            EQU        $04                    ; card is no longer locked into the socket
  84. kCSCardReadyMessage                EQU        $05                    ; card is ready to be accessed
  85. kCSCardResetMessage                EQU        $06                    ; physical reset has completed
  86. kCSInsertionRequestMessage        EQU        $07                    ; request to insert a card using insertion motor
  87. kCSInsertionCompleteMessage        EQU        $08                    ; insertion motor has finished inserting a card
  88. kCSEjectionRequestMessage        EQU        $09                    ; user or other client is requesting a card ejection
  89. kCSEjectionFailedMessage        EQU        $0A                    ; eject failure due to electrical/mechanical problems
  90. kCSPMResumeMessage                EQU        $0B                    ; power management resume (TBD)
  91. kCSPMSuspendMessage                EQU        $0C                    ; power management suspend (TBD)
  92. kCSResetPhysicalMessage            EQU        $0D                    ; physical reset is about to occur on this card
  93. kCSResetRequestMessage            EQU        $0E                    ; physical reset has been requested by a client
  94. kCSResetCompleteMessage            EQU        $0F                    ; ResetCard() background reset has completed
  95. kCSBatteryDeadMessage            EQU        $10                    ; battery is no longer useable, data will be lost
  96. kCSBatteryLowMessage            EQU        $11                    ; battery is weak and should be replaced
  97. kCSWriteProtectMessage            EQU        $12                    ; card is now write protected
  98. kCSWriteEnabledMessage            EQU        $13                    ; card is now write enabled
  99. kCSClientInfoMessage            EQU        $14                    ; client is to return client information
  100. kCSSSUpdatedMessage                EQU        $15                    ; AddSocketServices/ReplaceSocket services has changed SS support
  101. kCSFunctionInterruptMessage        EQU        $16                    ; card function interrupt
  102. kCSAccessErrorMessage            EQU        $17                    ; client bus errored on access to socket
  103. kCSCardUnconfiguredMessage        EQU        $18                    ; a CARD_READY was delivered to all clients and no client 
  104.                                                             ;    requested a configuration for the socket
  105. kCSStatusChangedMessage            EQU        $19                    ; status change for cards in I/O mode
  106. ;    The following is a mapping of the PCMCIA name space to the Macintosh name space.
  107. ;    These two enum lists will be removed and given to developers as a separate file.
  108. ;
  109.  
  110.  
  111. SUCCESS                            EQU        0
  112. BAD_ADAPTER                        EQU        -9050
  113. BAD_ATTRIBUTE                    EQU        -9051
  114. BAD_BASE                        EQU        -9052
  115. BAD_EDC                            EQU        -9053
  116. BAD_IRQ                            EQU        -9054
  117. BAD_OFFSET                        EQU        -9055
  118. BAD_PAGE                        EQU        -9056
  119. BAD_SIZE                        EQU        -9057
  120. BAD_SOCKET                        EQU        -9058
  121. BAD_TYPE                        EQU        -9059
  122. BAD_VCC                            EQU        -9060
  123. BAD_VPP                            EQU        -9061
  124. BAD_WINDOW                        EQU        -9062
  125. BAD_ARG_LENGTH                    EQU        -9063
  126. BAD_ARGS                        EQU        -9064
  127. BAD_HANDLE                        EQU        -9065
  128. BAD_CIS                            EQU        -9066
  129. BAD_SPEED                        EQU        -9067
  130. READ_FAILURE                    EQU        -9068
  131. WRITE_FAILURE                    EQU        -9069
  132. GENERAL_FAILURE                    EQU        -9070
  133. NO_CARD                            EQU        -9071
  134. UNSUPPORTED_FUNCTION            EQU        -9072
  135. UNSUPPORTED_MODE                EQU        -9073
  136. BUSY                            EQU        -9074
  137. WRITE_PROTECTED                    EQU        -9075
  138. CONFIGURATION_LOCKED            EQU        -9076
  139. IN_USE                            EQU        -9077
  140. NO_MORE_ITEMS                    EQU        -9078
  141. OUT_OF_RESOURCE                    EQU        -9079
  142.  
  143. ;     messages sent to client's event handler
  144.  
  145.  
  146. NULL_MESSAGE                    EQU        $00
  147. CARD_INSERTION                    EQU        $01
  148. CARD_REMOVAL                    EQU        $02
  149. CARD_LOCK                        EQU        $03
  150. CARD_UNLOCK                        EQU        $04
  151. CARD_READY                        EQU        $05
  152. CARD_RESET                        EQU        $06
  153. INSERTION_REQUEST                EQU        $07
  154. INSERTION_COMPLETE                EQU        $08
  155. EJECTION_REQUEST                EQU        $09
  156. EJECTION_FAILED                    EQU        $0A
  157. PM_RESUME                        EQU        $0B
  158. PM_SUSPEND                        EQU        $0C
  159. RESET_PHYSICAL                    EQU        $0D
  160. RESET_REQUEST                    EQU        $0E
  161. RESET_COMPLETE                    EQU        $0F
  162. BATTERY_DEAD                    EQU        $10
  163. BATTERY_LOW                        EQU        $11
  164. WRITE_PROTECT                    EQU        $12
  165. WRITE_ENABLED                    EQU        $13
  166. CLIENT_INFO                        EQU        $14
  167. SS_UPDATED                        EQU        $15
  168. FUNCTION_INTERRUPT                EQU        $16
  169. ACCESS_ERROR                    EQU        $17
  170. CARD_UNCONFIGURED                EQU        $18
  171. STATUS_CHANGED                    EQU        $19
  172.  
  173. ; ----------------        CSAccessConfigurationRegister    ----------------
  174.  
  175. AccessConfigurationRegisterPB RECORD 0
  176. socket                     ds.w    1                ; offset: $0 (0)        ;   -> global socket number
  177. action                     ds.b    1                ; offset: $2 (2)        ;   -> read/write
  178. offset                     ds.b    1                ; offset: $3 (3)        ;   -> offset from config register base
  179. value                     ds.b    1                ; offset: $4 (4)        ;  <-> value to read/write
  180. padding                     ds.b    1                ; offset: $5 (5) <-- really an array of length one ;  
  181. sizeof                     EQU *                    ; size:   $6 (6)
  182.                         ENDR
  183. ;     ‘action’ field values
  184.  
  185.  
  186. kCSReadConfigRegister            EQU        $00
  187. kCSWriteConfigRegister            EQU        $01
  188.  
  189. ; ----------------        CSGetCardServicesInfo            ----------------
  190.  
  191. GetCardServicesInfoPB    RECORD 0
  192. signature                 ds.b    2                ; offset: $0 (0)        ;  <-  two ascii chars 'CS'
  193. count                     ds.w    1                ; offset: $2 (2)        ;  <-  total number of sockets installed
  194. revision                 ds.w    1                ; offset: $4 (4)        ;  <-  BCD
  195. csLevel                     ds.w    1                ; offset: $6 (6)        ;  <-  BCD
  196. reserved                 ds.w    1                ; offset: $8 (8)        ;   -> zero
  197. vStrLen                     ds.w    1                ; offset: $A (10)        ;  <-> in: client's buffer size, out: vendor string length
  198. vendorString             ds.l    1                ; offset: $C (12)        ;  <-> in: pointer to buffer to hold CS vendor string (zero-terminated)
  199. ;       out: CS vendor string copied to buffer
  200. sizeof                     EQU *                    ; size:   $10 (16)
  201.                         ENDR
  202. ; ----------------        CSGetClientInfo                    ----------------
  203.  
  204.  
  205. ;  upper byte of attributes is kCSClientInfoSubfunction
  206. ClientInfoParam            RECORD 0
  207. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  208. attributes                 ds.w    1                ; offset: $4 (4)        ;  <-> subfunction + bitmapped client attributes
  209. revision                 ds.w    1                ; offset: $6 (6)        ;  <-  BCD value of client's revision
  210. csLevel                     ds.w    1                ; offset: $8 (8)        ;  <-  BCD value of CS release
  211. revDate                     ds.w    1                ; offset: $A (10)        ;  <-  revision date: y[15-9], m[8-5], d[4-0]
  212. nameLen                     ds.w    1                ; offset: $C (12)        ;  <-> in: max length of client name string, out: actual length
  213. vStringLen                 ds.w    1                ; offset: $E (14)        ;  <-> in: max length of vendor string, out: actual length
  214. nameString                 ds.l    1                ; offset: $10 (16)        ;  <-  pointer to client name string (zero-terminated)
  215. vendorString             ds.l    1                ; offset: $14 (20)        ;  <-  pointer to vendor string (zero-terminated)
  216. sizeof                     EQU *                    ; size:   $18 (24)
  217.                         ENDR
  218.  
  219. ;   upper byte of attributes is kCSCardNameSubfunction,
  220. ;                                 kCSCardTypeSubfunction,
  221. ;                                 kCSHelpStringSubfunction
  222.  
  223.  
  224. AlternateTextStringParam RECORD 0
  225. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  226. attributes                 ds.w    1                ; offset: $4 (4)        ;  <-> subfunction + bitmapped client attributes
  227. socket                     ds.w    1                ; offset: $6 (6)        ;   -> logical socket number
  228. reserved                 ds.w    1                ; offset: $8 (8)        ;   -> zero
  229. length                     ds.w    1                ; offset: $A (10)        ;  <-> in: max length of string, out: actual length
  230. text                     ds.l    1                ; offset: $C (12)        ;  <-  pointer to string (zero-terminated)
  231. sizeof                     EQU *                    ; size:   $10 (16)
  232.                         ENDR
  233. ;  upper byte of attributes is kCSCardIconSubfunction
  234. AlternateCardIconParam    RECORD 0
  235. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  236. attributes                 ds.w    1                ; offset: $4 (4)        ;  <-> subfunction + bitmapped client attributes
  237. socket                     ds.w    1                ; offset: $6 (6)        ;   -> logical socket number
  238. iconSuite                 ds.l    1                ; offset: $8 (8)        ;  <-  handle to icon suite containing all icons
  239. sizeof                     EQU *                    ; size:   $C (12)
  240.                         ENDR
  241. ;  upper byte of attributes is kCSActionProcSubfunction
  242. CustomActionProcParam    RECORD 0
  243. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  244. attributes                 ds.w    1                ; offset: $4 (4)        ;  <-> subfunction + bitmapped client attributes
  245. socket                     ds.w    1                ; offset: $6 (6)        ;   -> logical socket number
  246. sizeof                     EQU *                    ; size:   $8 (8)
  247.                         ENDR
  248. GetClientInfoPB            RECORD 0
  249. clientInfo                 ds        ClientInfoParam ; offset: $0 (0)
  250.                          ORG 0
  251. alternateTextString         ds        AlternateTextStringParam ; offset: $0 (0)
  252.                          ORG 0
  253. alternateIcon             ds        AlternateCardIconParam ; offset: $0 (0)
  254.                          ORG 0
  255. customActionProc         ds        CustomActionProcParam ; offset: $0 (0)
  256.                          ORG 24
  257. sizeof                     EQU *                    ; size:   $18 (24)
  258.                         ENDR
  259. ;     ‘attributes’ field values
  260.  
  261. kCSMemoryClient                    EQU        $0001
  262. kCSIOClient                        EQU        $0004
  263. kCSClientTypeMask                EQU        $0007
  264. kCSShareableCardInsertEvents    EQU        $0008
  265. kCSExclusiveCardInsertEvents    EQU        $0010
  266. kCSInfoSubfunctionMask            EQU        $FF00
  267. kCSClientInfoSubfunction        EQU        $0000
  268. kCSCardNameSubfunction            EQU        $8000
  269. kCSCardTypeSubfunction            EQU        $8100
  270. kCSHelpStringSubfunction        EQU        $8200
  271. kCSCardIconSubfunction            EQU        $8300
  272. kCSActionProcSubfunction        EQU        $8400
  273.  
  274.  
  275. ;  ----------------        CSGetConfigurationInfo            ----------------
  276. ;  ----------------        CSModifyConfiguration            ----------------
  277. ;  ----------------        CSRequestConfiguration            ----------------
  278.  
  279.  
  280.  
  281. GetModRequestConfigInfoPB RECORD 0
  282. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  283. socket                     ds.w    1                ; offset: $4 (4)        ;   -> logical socket number
  284. attributes                 ds.w    1                ; offset: $6 (6)        ;  <-> bitmap of configuration attributes
  285. vcc                         ds.b    1                ; offset: $8 (8)        ;  <-> Vcc setting
  286. vpp1                     ds.b    1                ; offset: $9 (9)        ;  <-> Vpp1 setting
  287. vpp2                     ds.b    1                ; offset: $A (10)        ;  <-> Vpp2 setting
  288. intType                     ds.b    1                ; offset: $B (11)        ;  <-> interface type (memory or memory+I/O)
  289. configBase                 ds.l    1                ; offset: $C (12)        ;  <-> card base address of configuration registers
  290. status                     ds.b    1                ; offset: $10 (16)        ;  <-> card status register setting, if present
  291. pin                         ds.b    1                ; offset: $11 (17)        ;  <-> card pin register setting, if present
  292. copy                     ds.b    1                ; offset: $12 (18)        ;  <-> card socket/copy register setting, if present
  293. configIndex                 ds.b    1                ; offset: $13 (19)        ;  <-> card option register setting, if present
  294. present                     ds.b    1                ; offset: $14 (20)        ;  <-> bitmap of which configuration registers are present
  295. firstDevType             ds.b    1                ; offset: $15 (21)        ;  <-  from DeviceID tuple
  296. funcCode                 ds.b    1                ; offset: $16 (22)        ;  <-  from FuncID tuple
  297. sysInitMask                 ds.b    1                ; offset: $17 (23)        ;  <-  from FuncID tuple
  298. manufCode                 ds.w    1                ; offset: $18 (24)        ;  <-  from ManufacturerID tuple
  299. manufInfo                 ds.w    1                ; offset: $1A (26)        ;  <-  from ManufacturerID tuple
  300. cardValues                 ds.b    1                ; offset: $1C (28)        ;  <-  valid card register values
  301. padding                     ds.b    1                ; offset: $1D (29) <-- really an array of length one ;  
  302. sizeof                     EQU *                    ; size:   $1E (30)
  303.                         ENDR
  304. ;     ‘attributes’ field values
  305.  
  306. kCSExclusivelyUsed                EQU        $0001
  307. kCSEnableIREQs                    EQU        $0002
  308. kCSVccChangeValid                EQU        $0004
  309. kCSVpp1ChangeValid                EQU        $0008
  310. kCSVpp2ChangeValid                EQU        $0010
  311. kCSValidClient                    EQU        $0020
  312. kCSSleepPower                    EQU        $0040                ; request that power be applied to socket during Sleep
  313. kCSLockSocket                    EQU        $0080
  314. kCSTurnOnInUse                    EQU        $0100
  315. ;     ‘intType’ field values
  316.  
  317.  
  318. kCSMemoryInterface                EQU        $01
  319. kCSMemory_And_IO_Interface        EQU        $02
  320. ;     ‘present’ field values
  321.  
  322.  
  323. kCSOptionRegisterPresent        EQU        $01
  324. kCSStatusRegisterPresent        EQU        $02
  325. kCSPinReplacementRegisterPresent EQU    $04
  326. kCSCopyRegisterPresent            EQU        $08
  327. ;     ‘cardValues’ field values
  328.  
  329.  
  330. kCSOptionValueValid                EQU        $01
  331. kCSStatusValueValid                EQU        $02
  332. kCSPinReplacementValueValid        EQU        $04
  333. kCSCopyValueValid                EQU        $08
  334.  
  335.  
  336. ;  ----------------        CSGetClientEventMask            ----------------
  337. ;  ----------------        CSSetClientEventMask            ----------------
  338.  
  339.  
  340.  
  341. GetSetClientEventMaskPB    RECORD 0
  342. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  343. attributes                 ds.w    1                ; offset: $4 (4)        ;  <-> bitmap of attributes
  344. eventMask                 ds.w    1                ; offset: $6 (6)        ;  <-> bitmap of events to be passed to client for this socket
  345. socket                     ds.w    1                ; offset: $8 (8)        ;   -> logical socket number
  346. sizeof                     EQU *                    ; size:   $A (10)
  347.                         ENDR
  348. ;     ‘attributes’ field values
  349.  
  350. kCSEventMaskThisSocketOnly        EQU        $0001
  351. ;     ‘eventMask’ field values
  352.  
  353.  
  354. kCSWriteProtectEvent            EQU        $0001
  355. kCSCardLockChangeEvent            EQU        $0002
  356. kCSEjectRequestEvent            EQU        $0004
  357. kCSInsertRequestEvent            EQU        $0008
  358. kCSBatteryDeadEvent                EQU        $0010
  359. kCSBatteryLowEvent                EQU        $0020
  360. kCSReadyChangeEvent                EQU        $0040
  361. kCSCardDetectChangeEvent        EQU        $0080
  362. kCSPMChangeEvent                EQU        $0100
  363. kCSResetEvent                    EQU        $0200
  364. kCSSSUpdateEvent                EQU        $0400
  365. kCSFunctionInterrupt            EQU        $0800
  366. kCSAllEvents                    EQU        $FFFF
  367.  
  368.  
  369. ;  ----------------        CSGetFirstClient                ----------------
  370. ;  ----------------        CSGetNextClient                    ----------------
  371.  
  372.  
  373.  
  374. GetClientPB                RECORD 0
  375. clientHandle             ds.l    1                ; offset: $0 (0)        ;  <-  clientHandle for this client
  376. socket                     ds.w    1                ; offset: $4 (4)        ;   -> logical socket number
  377. attributes                 ds.w    1                ; offset: $6 (6)        ;   -> bitmap of attributes
  378. sizeof                     EQU *                    ; size:   $8 (8)
  379.                         ENDR
  380. ;     ‘attributes’ field values
  381.  
  382. kCSClientsForAllSockets            EQU        $0000
  383. kCSClientsThisSocketOnly        EQU        $0001
  384.  
  385.  
  386. ;  ----------------        CSGetFirstTuple                    ----------------
  387. ;  ----------------        CSGetNextTuple                    ----------------
  388. ;  ----------------        CSGetTupleData                    ----------------
  389.  
  390.  
  391.  
  392. GetTuplePB                RECORD 0
  393. socket                     ds.w    1                ; offset: $0 (0)        ;   -> logical socket number
  394. attributes                 ds.w    1                ; offset: $2 (2)        ;   -> bitmap of attributes
  395. desiredTuple             ds.b    1                ; offset: $4 (4)        ;   -> desired tuple code value, or $FF for all
  396. tupleOffset                 ds.b    1                ; offset: $5 (5)        ;   -> offset into tuple from link byte
  397. flags                     ds.w    1                ; offset: $6 (6)        ;  <-> internal use
  398. linkOffset                 ds.l    1                ; offset: $8 (8)        ;  <-> internal use
  399. cisOffset                 ds.l    1                ; offset: $C (12)        ;  <-> internal use
  400. tupleCode                 ds.b    1                ; offset: $10 (16)        ;  <-  tuple code found
  401. tupleLink                 ds.b    1                ; offset: $11 (17)        ;  <-  link value for tuple found
  402.                          ORG 16
  403. tupleDataMax             ds.w    1                ; offset: $10 (16)        ;   -> maximum size of tuple data area
  404. tupleDataLen             ds.w    1                ; offset: $12 (18)        ;  <-  number of bytes in tuple body
  405. tupleData                 ds        TupleBody        ; offset: $14 (20)        ;  <-  tuple data
  406. sizeof                     EQU *                    ; size:   $112 (274)
  407.                         ENDR
  408. ;     ‘attributes’ field values
  409.  
  410. kCSReturnLinkTuples                EQU        $0001
  411.  
  412.  
  413. ;  ----------------        CSRequestSocketMask                ----------------
  414. ;  ----------------        CSReleaseSocketMask                ----------------
  415.  
  416.  
  417.  
  418. ReqRelSocketMaskPB        RECORD 0
  419. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  420. socket                     ds.w    1                ; offset: $4 (4)        ;   -> logical socket
  421. eventMask                 ds.w    1                ; offset: $6 (6)        ;   -> bitmap of events to be passed to client for this socket
  422. sizeof                     EQU *                    ; size:   $8 (8)
  423.                         ENDR
  424. ;     ‘eventMask’ field values (see above for Get/SetClientEventMask
  425.  
  426. ; ----------------        CSGetStatus                        ----------------
  427.  
  428. GetStatusPB                RECORD 0
  429. socket                     ds.w    1                ; offset: $0 (0)        ;   -> logical socket number
  430. cardState                 ds.w    1                ; offset: $2 (2)        ;  <-  current state of installed card
  431. socketState                 ds.w    1                ; offset: $4 (4)        ;  <-  current state of the socket
  432. sizeof                     EQU *                    ; size:   $6 (6)
  433.                         ENDR
  434. ;     ‘cardState’ field values
  435.  
  436. kCSWriteProtected                EQU        $0001
  437. kCSCardLocked                    EQU        $0002
  438. kCSEjectRequest                    EQU        $0004
  439. kCSInsertRequest                EQU        $0008
  440. kCSBatteryDead                    EQU        $0010
  441. kCSBatteryLow                    EQU        $0020
  442. kCSReady                        EQU        $0040
  443. kCSCardDetected                    EQU        $0080
  444. ;     ‘socketState’ field values
  445.  
  446.  
  447. kCSWriteProtectChanged            EQU        $0001
  448. kCSCardLockChanged                EQU        $0002
  449. kCSEjectRequestPending            EQU        $0004
  450. kCSInsertRequestPending            EQU        $0008
  451. kCSBatteryDeadChanged            EQU        $0010
  452. kCSBatteryLowChanged            EQU        $0020
  453. kCSReadyChanged                    EQU        $0040
  454. kCSCardDetectChanged            EQU        $0080
  455.  
  456.  
  457. ;  ----------------        CSModifyWindow                    ----------------
  458. ;  ----------------        CSReleaseWindow                    ----------------
  459. ;  ----------------        CSRequestWindow                    ----------------
  460.  
  461.  
  462.  
  463. ReqModRelWindowPB        RECORD 0
  464. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  465. windowHandle             ds.l    1                ; offset: $4 (4)        ;  <-> window descriptor
  466. socket                     ds.w    1                ; offset: $8 (8)        ;   -> logical socket number
  467. attributes                 ds.w    1                ; offset: $A (10)        ;   -> window attributes (bitmap)
  468. base                     ds.l    1                ; offset: $C (12)        ;  <-> system base address
  469. size                     ds.l    1                ; offset: $10 (16)        ;  <-> memory window size
  470. accessSpeed                 ds.b    1                ; offset: $14 (20)        ;   -> window access speed (bitmap)
  471. ;         (not applicable for I/O mode)
  472. padding                     ds.b    1                ; offset: $15 (21) <-- really an array of length one ;  
  473. sizeof                     EQU *                    ; size:   $16 (22)
  474.                         ENDR
  475. ;     ‘attributes’ field values
  476.  
  477. kCSMemoryWindow                    EQU        $0001
  478. kCSIOWindow                        EQU        $0002
  479. kCSAttributeWindow                EQU        $0004                ; not normally used by Card Services clients
  480. kCSWindowTypeMask                EQU        $0007
  481. kCSEnableWindow                    EQU        $0008
  482. kCSAccessSpeedValid                EQU        $0010
  483. kCSLittleEndian                    EQU        $0020                ; configure socket for little endianess
  484. kCS16BitDataPath                EQU        $0040
  485. kCSWindowPaged                    EQU        $0080                ; 
  486. kCSWindowShared                    EQU        $0100
  487. kCSWindowFirstShared            EQU        $0200                ; 
  488. kCSWindowProgrammable            EQU        $0400                ; 
  489. ;     ‘accessSpeed’ field values
  490.  
  491.  
  492. kCSDeviceSpeedCodeMask            EQU        $07
  493. kCSSpeedExponentMask            EQU        $07
  494. kCSSpeedMantissaMask            EQU        $78
  495. kCSUseWait                        EQU        $80
  496. kCSAccessSpeed250nsec            EQU        $01
  497. kCSAccessSpeed200nsec            EQU        $02
  498. kCSAccessSpeed150nsec            EQU        $03
  499. kCSAccessSpeed100nsec            EQU        $04
  500. kCSExtAccSpeedMant1pt0            EQU        $01
  501. kCSExtAccSpeedMant1pt2            EQU        $02
  502. kCSExtAccSpeedMant1pt3            EQU        $03
  503. kCSExtAccSpeedMant1pt5            EQU        $04
  504. kCSExtAccSpeedMant2pt0            EQU        $05
  505. kCSExtAccSpeedMant2pt5            EQU        $06
  506. kCSExtAccSpeedMant3pt0            EQU        $07
  507. kCSExtAccSpeedMant3pt5            EQU        $08
  508. kCSExtAccSpeedMant4pt0            EQU        $09
  509. kCSExtAccSpeedMant4pt5            EQU        $0A
  510. kCSExtAccSpeedMant5pt0            EQU        $0B
  511. kCSExtAccSpeedMant5pt5            EQU        $0C
  512. kCSExtAccSpeedMant6pt0            EQU        $0D
  513. kCSExtAccSpeedMant7pt0            EQU        $0E
  514. kCSExtAccSpeedMant8pt0            EQU        $0F
  515. kCSExtAccSpeedExp1ns            EQU        $00
  516. kCSExtAccSpeedExp10ns            EQU        $01
  517. kCSExtAccSpeedExp100ns            EQU        $02
  518. kCSExtAccSpeedExp1us            EQU        $03
  519. kCSExtAccSpeedExp10us            EQU        $04
  520. kCSExtAccSpeedExp100us            EQU        $05
  521. kCSExtAccSpeedExp1ms            EQU        $06
  522. kCSExtAccSpeedExp10ms            EQU        $07
  523.  
  524.  
  525. ;  ----------------        CSRegisterClient                ----------------
  526. ;  ----------------        CSDeregisterClient                ----------------
  527.  
  528.  
  529.  
  530. ClientCallbackPB        RECORD 0
  531. message                     ds.w    1                ; offset: $0 (0)        ;   -> which event this is
  532. socket                     ds.w    1                ; offset: $2 (2)        ;   -> logical socket number
  533. info                     ds.w    1                ; offset: $4 (4)        ;   -> function-specific
  534. misc                     ds.w    1                ; offset: $6 (6)        ;   -> function-specific
  535. reserved                 ds.l    1                ; offset: $8 (8)        ;   -> pointer to MTD request block
  536. buffer                     ds.l    1                ; offset: $C (12)        ;   -> function-specific
  537. clientData                 ds.l    1                ; offset: $10 (16)        ;   -> pointer to client's data (from RegisterClient)
  538. sizeof                     EQU *                    ; size:   $14 (20)
  539.                         ENDR
  540. ; typedef struct ClientCallbackPB *        ClientCallbackPBPtr
  541.  
  542. RegisterClientPB        RECORD 0
  543. clientHandle             ds.l    1                ; offset: $0 (0)        ;  <-  client descriptor
  544. clientEntry                 ds.l    1                ; offset: $4 (4)        ;   -> universal procPtr to client's event handler
  545. attributes                 ds.w    1                ; offset: $8 (8)        ;   -> bitmap of client attributes
  546. eventMask                 ds.w    1                ; offset: $A (10)        ;   -> bitmap of events to notify client
  547. clientData                 ds.l    1                ; offset: $C (12)        ;   -> pointer to client's data
  548. version                     ds.w    1                ; offset: $10 (16)        ;   -> Card Services version this client expects
  549. sizeof                     EQU *                    ; size:   $12 (18)
  550.                         ENDR
  551. ;     ‘attributes’ field values (see GetClientInfo)
  552.  
  553. ;      kCSMemoryClient                    = 0x0001,
  554. ;      kCSIOClient                        = 0x0004,
  555. ;      kCSShareableCardInsertEvents    = 0x0008,
  556. ;      kCSExclusiveCardInsertEvents    = 0x0010
  557.  
  558.  
  559.  
  560.  
  561. ; ----------------        CSReleaseConfiguration            ----------------
  562.  
  563. ReleaseConfigurationPB    RECORD 0
  564. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  565. socket                     ds.w    1                ; offset: $4 (4)        ;   -> 
  566. sizeof                     EQU *                    ; size:   $6 (6)
  567.                         ENDR
  568. ; ----------------        CSResetCard                        ----------------
  569.  
  570. ResetCardPB                RECORD 0
  571. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  572. socket                     ds.w    1                ; offset: $4 (4)        ;   -> 
  573. attributes                 ds.w    1                ; offset: $6 (6)        ;   -> xxx
  574. sizeof                     EQU *                    ; size:   $8 (8)
  575.                         ENDR
  576. ; ----------------        CSValidateCIS                    ----------------
  577.  
  578. ValidateCISPB            RECORD 0
  579. socket                     ds.w    1                ; offset: $0 (0)        ;   -> 
  580. chains                     ds.w    1                ; offset: $2 (2)        ;   -> whether link/null tuples should be included
  581. sizeof                     EQU *                    ; size:   $4 (4)
  582.                         ENDR
  583.  
  584. ;  ----------------        CSRequestIO                        ----------------
  585. ;  ----------------        CSReleaseIO                        ----------------
  586.  
  587.  
  588.  
  589. ReqRelIOPB                RECORD 0
  590. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  591. socket                     ds.w    1                ; offset: $4 (4)        ;   -> socket number
  592. reserved                 ds.w    1                ; offset: $6 (6)
  593. basePort1                 ds.w    1                ; offset: $8 (8)        ;     ->    base I/O port for range
  594. numPorts1                 ds.b    1                ; offset: $A (10)        ;     ->    number of ports (e.g., bytes).
  595. attributes1                 ds.b    1                ; offset: $B (11)        ;     ->    attributes
  596. basePort2                 ds.w    1                ; offset: $C (12)        ;     ->    base I/O port for range
  597. numPorts2                 ds.b    1                ; offset: $E (14)        ;     ->    number of ports
  598. attributes2                 ds.b    1                ; offset: $F (15)        ;     ->    attributes
  599. ioAddrLines                 ds.b    1                ; offset: $10 (16)        ;     -> number of I/O lines decoded by card
  600. reserved1                 ds.b    1                ; offset: $11 (17)
  601. sizeof                     EQU *                    ; size:   $12 (18)
  602.                         ENDR
  603. ; ----------------        CSVendorSpecific                ----------------
  604. VendorSpecificPB        RECORD 0
  605. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  606. vsCode                     ds.w    1                ; offset: $4 (4)
  607. socket                     ds.w    1                ; offset: $6 (6)
  608. dataLen                     ds.l    1                ; offset: $8 (8)        ;   -> length of buffer pointed to by vsDataPtr
  609. vsDataPtr                 ds.l    1                ; offset: $C (12)        ;   -> Card Services version this client expects
  610. sizeof                     EQU *                    ; size:   $10 (16)
  611.                         ENDR
  612. ;     ‘vsCode’ field values
  613.  
  614.  
  615. vsAppleReserved                    EQU        $0000
  616. vsEjectCard                        EQU        $0001
  617. vsGetCardInfo                    EQU        $0002
  618. vsEnableSocketEvents            EQU        $0003
  619. vsGetCardLocationIcon            EQU        $0004
  620. vsGetCardLocationText            EQU        $0005
  621. vsGetAdapterInfo                EQU        $0006
  622.  
  623. ;  ///////////////////////////////////////////////////////////////////////////////////////
  624. ;      GetAdapterInfo parameter block (vendor-specific call #6)
  625.  
  626.  
  627.  
  628. GetAdapterInfoPB        RECORD 0
  629. attributes                 ds.l    1                ; offset: $0 (0)        ;  <-  capabilties of socket's adapter
  630. revision                 ds.w    1                ; offset: $4 (4)        ;  <-  id of adapter
  631. reserved                 ds.w    1                ; offset: $6 (6)        ;  
  632. numVoltEntries             ds.w    1                ; offset: $8 (8)        ;  <-  number of valid voltage values
  633. voltages                 ds.l    1                ; offset: $A (10)        ;  <-> array of BCD voltage values
  634. sizeof                     EQU *                    ; size:   $E (14)
  635.                         ENDR
  636. ;     ‘attributes’ field values
  637.  
  638. kCSLevelModeInterrupts            EQU        $00000001
  639. kCSPulseModeInterrupts            EQU        $00000002
  640. kCSProgrammableWindowAddr        EQU        $00000004
  641. kCSProgrammableWindowSize        EQU        $00000008
  642. kCSSocketSleepPower                EQU        $00000010
  643. kCSSoftwareEject                EQU        $00000020
  644. kCSLockableSocket                EQU        $00000040
  645. kCSInUseIndicator                EQU        $00000080
  646.  
  647. ;  ///////////////////////////////////////////////////////////////////////////////////////
  648. ;      GetCardInfo parameter block (vendor-specific call #2)
  649.  
  650.  
  651.  
  652. GetCardInfoPB            RECORD 0
  653. cardType                 ds.b    1                ; offset: $0 (0)        ;  <-  type of card in this socket (defined at top of file)
  654. subType                     ds.b    1                ; offset: $1 (1)        ;  <-  more detailed card type (defined at top of file)
  655. reserved                 ds.w    1                ; offset: $2 (2)        ;  <-> reserved (should be set to zero)
  656. cardNameLen                 ds.w    1                ; offset: $4 (4)        ;   -> maximum length of card name to be returned
  657. vendorNameLen             ds.w    1                ; offset: $6 (6)        ;   -> maximum length of vendor name to be returned
  658. cardName                 ds.l    1                ; offset: $8 (8)        ;   -> pointer to card name string (read from CIS), or nil
  659. vendorName                 ds.l    1                ; offset: $C (12)        ;   -> pointer to vendor name string (read from CIS), or nil
  660. sizeof                     EQU *                    ; size:   $10 (16)
  661.                         ENDR
  662. ;     GetCardInfo card types
  663.  
  664. kCSUnknownCardType                EQU        0
  665. kCSMultiFunctionCardType        EQU        1
  666. kCSMemoryCardType                EQU        2
  667. kCSSerialPortCardType            EQU        3
  668. kCSSerialOnlyType                EQU        0
  669. kCSDataModemType                EQU        1
  670. kCSFaxModemType                    EQU        2
  671. kCSFaxAndDataModemMask            EQU        3
  672. kCSVoiceEncodingType            EQU        4
  673. kCSParallelPortCardType            EQU        4
  674. kCSFixedDiskCardType            EQU        5
  675. kCSUnknownFixedDiskType            EQU        0
  676. kCSATAInterface                    EQU        1
  677. kCSRotatingDevice                EQU        $00
  678. kCSSiliconDevice                EQU        $80
  679. kCSVideoAdaptorCardType            EQU        6
  680. kCSNetworkAdaptorCardType        EQU        7
  681. kCSAIMSCardType                    EQU        8
  682. kCSNumCardTypes                    EQU        9
  683.  
  684.     IF &TYPE('__PCCARDENABLERPLUGIN__') = 'UNDEFINED' THEN
  685. ;    NOTE: These prototypes conflict with PCCardEnablerPlugin.≈
  686. ;          You cannot use both PCCardEnablerPlugin.h and CardServices.h
  687. ;          
  688. ;
  689.  
  690. ;
  691. ; pascal OSErr CSVendorSpecific(VendorSpecificPB *pb)
  692. ;
  693.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  694.         Macro
  695.         _CSVendorSpecific
  696.             moveq               #0,D0
  697.             dc.w                $AAF0
  698.         EndM
  699.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  700.         IMPORT_CFM_FUNCTION CSVendorSpecific
  701.     ENDIF
  702.  
  703. ;
  704. ; pascal OSErr CSRegisterClient(RegisterClientPB *pb)
  705. ;
  706.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  707.         Macro
  708.         _CSRegisterClient
  709.             moveq               #1,D0
  710.             dc.w                $AAF0
  711.         EndM
  712.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  713.         IMPORT_CFM_FUNCTION CSRegisterClient
  714.     ENDIF
  715.  
  716. ;
  717. ; pascal OSErr CSDeregisterClient(RegisterClientPB *pb)
  718. ;
  719.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  720.         Macro
  721.         _CSDeregisterClient
  722.             moveq               #2,D0
  723.             dc.w                $AAF0
  724.         EndM
  725.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  726.         IMPORT_CFM_FUNCTION CSDeregisterClient
  727.     ENDIF
  728.  
  729. ;
  730. ; pascal OSErr CSGetFirstTuple(GetTuplePB *pb)
  731. ;
  732.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  733.         Macro
  734.         _CSGetFirstTuple
  735.             moveq               #3,D0
  736.             dc.w                $AAF0
  737.         EndM
  738.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  739.         IMPORT_CFM_FUNCTION CSGetFirstTuple
  740.     ENDIF
  741.  
  742. ;
  743. ; pascal OSErr CSGetNextTuple(GetTuplePB *pb)
  744. ;
  745.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  746.         Macro
  747.         _CSGetNextTuple
  748.             moveq               #4,D0
  749.             dc.w                $AAF0
  750.         EndM
  751.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  752.         IMPORT_CFM_FUNCTION CSGetNextTuple
  753.     ENDIF
  754.  
  755. ;
  756. ; pascal OSErr CSGetTupleData(GetTuplePB *pb)
  757. ;
  758.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  759.         Macro
  760.         _CSGetTupleData
  761.             moveq               #5,D0
  762.             dc.w                $AAF0
  763.         EndM
  764.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  765.         IMPORT_CFM_FUNCTION CSGetTupleData
  766.     ENDIF
  767.  
  768. ;
  769. ; pascal OSErr CSGetConfigurationInfo(GetModRequestConfigInfoPB *pb)
  770. ;
  771.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  772.         Macro
  773.         _CSGetConfigurationInfo
  774.             moveq               #6,D0
  775.             dc.w                $AAF0
  776.         EndM
  777.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  778.         IMPORT_CFM_FUNCTION CSGetConfigurationInfo
  779.     ENDIF
  780.  
  781. ;
  782. ; pascal OSErr CSGetCardServicesInfo(GetCardServicesInfoPB *pb)
  783. ;
  784.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  785.         Macro
  786.         _CSGetCardServicesInfo
  787.             moveq               #7,D0
  788.             dc.w                $AAF0
  789.         EndM
  790.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  791.         IMPORT_CFM_FUNCTION CSGetCardServicesInfo
  792.     ENDIF
  793.  
  794. ;
  795. ; pascal OSErr CSGetStatus(GetStatusPB *pb)
  796. ;
  797.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  798.         Macro
  799.         _CSGetStatus
  800.             moveq               #8,D0
  801.             dc.w                $AAF0
  802.         EndM
  803.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  804.         IMPORT_CFM_FUNCTION CSGetStatus
  805.     ENDIF
  806.  
  807. ;
  808. ; pascal OSErr CSValidateCIS(ValidateCISPB *pb)
  809. ;
  810.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  811.         Macro
  812.         _CSValidateCIS
  813.             moveq               #9,D0
  814.             dc.w                $AAF0
  815.         EndM
  816.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  817.         IMPORT_CFM_FUNCTION CSValidateCIS
  818.     ENDIF
  819.  
  820. ;
  821. ; pascal OSErr CSGetFirstClient(GetClientPB *pb)
  822. ;
  823.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  824.         Macro
  825.         _CSGetFirstClient
  826.             moveq               #15,D0
  827.             dc.w                $AAF0
  828.         EndM
  829.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  830.         IMPORT_CFM_FUNCTION CSGetFirstClient
  831.     ENDIF
  832.  
  833. ;
  834. ; pascal OSErr CSGetNextClient(GetClientPB *pb)
  835. ;
  836.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  837.         Macro
  838.         _CSGetNextClient
  839.             moveq               #16,D0
  840.             dc.w                $AAF0
  841.         EndM
  842.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  843.         IMPORT_CFM_FUNCTION CSGetNextClient
  844.     ENDIF
  845.  
  846. ;
  847. ; pascal OSErr CSGetClientInfo(GetClientInfoPB *pb)
  848. ;
  849.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  850.         Macro
  851.         _CSGetClientInfo
  852.             moveq               #17,D0
  853.             dc.w                $AAF0
  854.         EndM
  855.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  856.         IMPORT_CFM_FUNCTION CSGetClientInfo
  857.     ENDIF
  858.  
  859. ;
  860. ; pascal OSErr CSResetCard(ResetCardPB *pb)
  861. ;
  862.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  863.         Macro
  864.         _CSResetCard
  865.             moveq               #18,D0
  866.             dc.w                $AAF0
  867.         EndM
  868.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  869.         IMPORT_CFM_FUNCTION CSResetCard
  870.     ENDIF
  871.  
  872. ;
  873. ; pascal OSErr CSRequestWindow(ReqModRelWindowPB *pb)
  874. ;
  875.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  876.         Macro
  877.         _CSRequestWindow
  878.             moveq               #19,D0
  879.             dc.w                $AAF0
  880.         EndM
  881.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  882.         IMPORT_CFM_FUNCTION CSRequestWindow
  883.     ENDIF
  884.  
  885. ;
  886. ; pascal OSErr CSModifyWindow(ReqModRelWindowPB *pb)
  887. ;
  888.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  889.         Macro
  890.         _CSModifyWindow
  891.             moveq               #20,D0
  892.             dc.w                $AAF0
  893.         EndM
  894.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  895.         IMPORT_CFM_FUNCTION CSModifyWindow
  896.     ENDIF
  897.  
  898. ;
  899. ; pascal OSErr CSReleaseWindow(ReqModRelWindowPB *pb)
  900. ;
  901.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  902.         Macro
  903.         _CSReleaseWindow
  904.             moveq               #21,D0
  905.             dc.w                $AAF0
  906.         EndM
  907.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  908.         IMPORT_CFM_FUNCTION CSReleaseWindow
  909.     ENDIF
  910.  
  911. ;
  912. ; pascal OSErr CSRequestConfiguration(GetModRequestConfigInfoPB *pb)
  913. ;
  914.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  915.         Macro
  916.         _CSRequestConfiguration
  917.             moveq               #27,D0
  918.             dc.w                $AAF0
  919.         EndM
  920.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  921.         IMPORT_CFM_FUNCTION CSRequestConfiguration
  922.     ENDIF
  923.  
  924. ;
  925. ; pascal OSErr CSModifyConfiguration(GetModRequestConfigInfoPB *pb)
  926. ;
  927.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  928.         Macro
  929.         _CSModifyConfiguration
  930.             moveq               #28,D0
  931.             dc.w                $AAF0
  932.         EndM
  933.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  934.         IMPORT_CFM_FUNCTION CSModifyConfiguration
  935.     ENDIF
  936.  
  937. ;
  938. ; pascal OSErr CSAccessConfigurationRegister(AccessConfigurationRegisterPB *pb)
  939. ;
  940.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  941.         Macro
  942.         _CSAccessConfigurationRegister
  943.             moveq               #29,D0
  944.             dc.w                $AAF0
  945.         EndM
  946.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  947.         IMPORT_CFM_FUNCTION CSAccessConfigurationRegister
  948.     ENDIF
  949.  
  950. ;
  951. ; pascal OSErr CSReleaseConfiguration(ReleaseConfigurationPB *pb)
  952. ;
  953.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  954.         Macro
  955.         _CSReleaseConfiguration
  956.             moveq               #30,D0
  957.             dc.w                $AAF0
  958.         EndM
  959.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  960.         IMPORT_CFM_FUNCTION CSReleaseConfiguration
  961.     ENDIF
  962.  
  963. ;
  964. ; pascal OSErr CSGetClientEventMask(GetSetClientEventMaskPB *pb)
  965. ;
  966.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  967.         Macro
  968.         _CSGetClientEventMask
  969.             moveq               #31,D0
  970.             dc.w                $AAF0
  971.         EndM
  972.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  973.         IMPORT_CFM_FUNCTION CSGetClientEventMask
  974.     ENDIF
  975.  
  976. ;
  977. ; pascal OSErr CSSetClientEventMask(GetSetClientEventMaskPB *pb)
  978. ;
  979.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  980.         Macro
  981.         _CSSetClientEventMask
  982.             moveq               #32,D0
  983.             dc.w                $AAF0
  984.         EndM
  985.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  986.         IMPORT_CFM_FUNCTION CSSetClientEventMask
  987.     ENDIF
  988.  
  989. ;
  990. ; pascal OSErr CSRequestSocketMask(ReqRelSocketMaskPB *pb)
  991. ;
  992.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  993.         Macro
  994.         _CSRequestSocketMask
  995.             moveq               #33,D0
  996.             dc.w                $AAF0
  997.         EndM
  998.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  999.         IMPORT_CFM_FUNCTION CSRequestSocketMask
  1000.     ENDIF
  1001.  
  1002. ;
  1003. ; pascal OSErr CSReleaseSocketMask(ReqRelSocketMaskPB *pb)
  1004. ;
  1005.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1006.         Macro
  1007.         _CSReleaseSocketMask
  1008.             moveq               #34,D0
  1009.             dc.w                $AAF0
  1010.         EndM
  1011.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1012.         IMPORT_CFM_FUNCTION CSReleaseSocketMask
  1013.     ENDIF
  1014.  
  1015.  
  1016.  
  1017. ;      Additional calls which are required for all I/O clients when running on
  1018. ;      systems which do not reserve dedicated I/O-spaces for each PC Card.
  1019.  
  1020.  
  1021.  
  1022. ;
  1023. ; pascal OSErr CSRequestIO(ReqRelIOPB *pb)
  1024. ;
  1025.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1026.         Macro
  1027.         _CSRequestIO
  1028.             moveq               #37,D0
  1029.             dc.w                $AAF0
  1030.         EndM
  1031.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1032.         IMPORT_CFM_FUNCTION CSRequestIO
  1033.     ENDIF
  1034.  
  1035. ;
  1036. ; pascal OSErr CSReleaseIO(ReqRelIOPB *pb)
  1037. ;
  1038.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1039.         Macro
  1040.         _CSReleaseIO
  1041.             moveq               #38,D0
  1042.             dc.w                $AAF0
  1043.         EndM
  1044.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1045.         IMPORT_CFM_FUNCTION CSReleaseIO
  1046.     ENDIF
  1047.  
  1048.     ENDIF
  1049.     ENDIF ; __CARDSERVICES__ 
  1050.  
  1051.